﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using WMSSoft.Lib.WinKStart.ViewModel;

namespace WMSSoft.Lib.WinKStart.Abstract
{
    public abstract class CCommandViewModel : CViewModelBase
    {
        protected List<CSingleCommandViewModel> m_oCommands = new List<CSingleCommandViewModel>();

        private ReadOnlyCollection<CSingleCommandViewModel> m_oCommandViews;

        public ReadOnlyCollection<CSingleCommandViewModel> Commands
        {
            get
            {
                if (m_oCommandViews == null)
                {
                    m_oCommandViews = new ReadOnlyCollection<CSingleCommandViewModel>(m_oCommands);
                }

                return m_oCommandViews;
            }
        }

        public CCommandViewModel() { }
    }
    
}
